import axios from 'axios'

export async function getProductList() {
  const result = await axios.post(
    'http://101.43.15.9:7600/api/changan/product/get'
  )
  return result.data
}

export async function addProduct(obj) {
    const result = await axios.post(
      'http://101.43.15.9:7600/api/changan/product/add',obj
    )
    return result.data
}

export async function editProduct(obj) {
    const result = await axios.post(
      'http://101.43.15.9:7600/api/changan/product/update',obj
    )
    return result.data
}

export async function removeProduct(obj) {
    const result = await axios.post(
      'http://101.43.15.9:7600/api/changan/product/delete',obj
    )
    return result.data
}

export async function searchProduct(obj) {
  const result = await axios.post(
    'http://101.43.15.9:7600/api/changan/product/get',obj
  )
  return result.data
}